Upload Numbers to Customer
This request uploads a list of SBC prefixes to a target customer tenant. The customer must have provided prior consent to the operator and the consent must include the numbers of the country calling plan (as configured by the customer in their Teams admin center). All numbers that are uploaded to Live Cloud are also downloaded to the OCDialPlan on the SBC device. See also Uploading Operator Connect Numbers.
● | OCDialPlan should be preconfigured on the SBC device that is designated to manage Operator Connect numbers. |
● | Prior to uploading numbers, you can verify whether the targeting numbers already exist on the SBC and Live Cloud (see Get DialPlans). |
● | This operation requires you to specify a calling profile, usage and number capabilities. See Retrieve Microsoft Operator Connect Calling Profiles. |
URI
{{baseUrl}}/api/v2/oc/numbers/action/upload?msTenantId={{msTenantId}}
HTTP Method
POST
Request Parameters
Parameter |
Type |
Description |
---|---|---|
msTenantId |
string |
Microsoft TenantId (Azure Tenant ID of the customer). |
Request Body
Parameter |
Type |
Description |
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
callingProfile |
string |
Names of Configured Calling Profiles. |
||||||||||||||||||
Usage |
string |
Calling usage types as defined in customer Teams admin center and Operator Connect JSON file:
|
||||||||||||||||||
AdditionalUsage |
string |
Support for Additional usage type. For example if you choose FirstPartyAppAssignment in the Usage, then you can choose Conference Assignment or CallingUserAssignment for the Additional Usage. Configuration of Additional usage requires workflowVersion 3. |
||||||||||||||||||
Capabilities |
list |
Names of the Predefined Calling Capabilities. |
||||||||||||||||||
phoneNumbersList |
List
|
List of phone numbers that are uploaded for the customer. |
||||||||||||||||||
workflowVersion |
integer
|
Workflow version number. Version 3 is required for configuring Additional usage (see above). |
||||||||||||||||||
country |
string |
The Country dialing code of the number. See Country Dialing Codes for a full list of Country Dialing codes. A country dialing code is Mandatory when uploading a Toll-free number in a North America Numbering Plan. |
||||||||||||||||||
Phone number validation rules are in accordance with E.164. The E.164 format requires the following:
Local telephone number or subscriber number. It has the following structure: [+][country code][area code][subscriber number]. Example of a number with E.164 format in the United States Telephone number: 415 123 1234 E.164 format number: +14151231234
Valid country code, per civic address and/or contact info of the given lead. See Country Dialing Codes. |
Example Request Body
{
"callingProfile": "5f3fbb3b-df9b-483d-b294-c7eb01e22aac",
"usage": "CallingUserAssignment",
"additionalUsages": ["FirstPartyAppAssignment"],
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumbers": ["+18005678934"],
"workflowVersion": "3",
"country": "US"
}
You can also verify the new numbers using the Retrieve Customer Number request (see Get Customer Numbers).
Example Request Body-Range
{
"callingProfile": "5f3fbb3b-df9b-483d-b294-c7eb01e22aac",
"usage": "CallingUserAssignment",
"additionalUsages": ["FirstPartyAppAssignment"],
"capabilities": ["InboundCalling", "OutboundCalling"],
"phoneNumbers": ["+97239764533","+97239764535"],
"phoneNumberRanges": [
{
"start": "+97239764660",
"end": "+97239764670"
}
],
"workflowVersion": 3
}
Example Response
The initial response displays the Task Id.
Parameter |
Type |
Description |
---|---|---|
Task Id |
string |
The queued task Id that is generated for this action. You must run the Task request to retrieve the status of the action. See Task Status. Note that the wup string in the prefix is unique for this endpoint. |
{
"taskId": "wup_c14a0a55-fcc5-4598-b405-c978e7da1af4"
}
The execution of the request may take a few minutes. The status will progress from 'In Progress' to 'Completed Success'.
{
"id": "wup_d4b23bb0-3b8a-4966-a368-fef9667d019f",
"status": "CompletedSuccess",
"details": [
"NumbersUploaded"
],
"executionMessages": [
{
"level": "Information",
"message": "Input is valid."
},
{
"level": "Information",
"message": "All uploaded numbers are not present in Microsoft context."
},
{
"level": "Information",
"message": "Site GRXRATNEUZMNZ found."
},
{
"level": "Information",
"message": "Number(s) accepted by Microsoft."
},
{
"level": "Information",
"message": "UploadToAccount job status: Success."
},
{
"level": "Information",
"message": "Moving on"
},
{
"level": "Information",
"message": "Telephone numbers programmed in SBC. 8"
},
{
"level": "Information",
"message": "Workflow completed."
}
],
"outputData": {
"CreateTime": "2023-09-28T12:14:21.5111156Z",
"CompleteTime": "2023-09-28T12:14:47.2635149Z",
"OcUploadNumberResult": "NumbersUploaded",
"WorkflowVersion": 3,
"SbcIdList": [
8
],
"MsJobWhenUpdated": "2023-09-28T12:14:46.0908199+00:00",
"MsJobId": "899c58a5-92df-4e93-a142-a35e72b7b743",
"MsJobStatus": "Success"
}
}
HTTP Responses
■ | 200 OK |
Parameter |
Type |
Description |
|||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
string |
Task Id |
|||||||||||||||||||||||||||||||||||||||||||||
status |
string |
Task status is one of the following
The cache mechanism used to Upload numbers is according to Distributed Cache. |
|||||||||||||||||||||||||||||||||||||||||||||
details |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
executionMessages |
list array |
This list array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||
level |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
message |
string |
The following 'Information' messages may appear:
The following 'Error' messages may appear:
The following are example error messages:
Copy
Copy
Copy
When attempting to upload a a Toll-free number with the usage "CallingUserAssignment". Copy
The following error message is displayed as Toll-free numbers must be configured with the usage 'FirstPartyAppAssignment'. Copy
|
|||||||||||||||||||||||||||||||||||||||||||||
outputData |
List array |
This array includes the following parameters:
|
|||||||||||||||||||||||||||||||||||||||||||||
CreateTime |
string($date-time) |
Timestamp at the commencement of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||
CompleteTime |
string($date-time) |
Timestamp at the completion of the number upload. |
|||||||||||||||||||||||||||||||||||||||||||||
OcUploadNumberResult |
string |
One of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||||
WorkflowVersion |
integer |
Version of the Workflow API. |
|||||||||||||||||||||||||||||||||||||||||||||
SbcIdList |
integer |
Id of the SBC device in the Live Cloud database. |
|||||||||||||||||||||||||||||||||||||||||||||
MsJobWhenUpdated |
string($date-time) |
Timestamp when the Microsoft tenant platform was updated with the new number. |
|||||||||||||||||||||||||||||||||||||||||||||
MsJobId |
string |
Id of the job to update the Microsoft platform. |
■ | 400 Bad Request: Syntax Error |
Number upload example:
"phoneNumbers[11]": [
"Unexpected character encountered while parsing value: ,. Path 'phoneNumbers[11]', line 6, position 183."
■ | 400 Bad Request: 'Invalid Calling ProfileId'; see Retrieve Microsoft Operator Connect Calling Profiles to verify correct Calling Profile Ids). |
{
"errors": {
"CallingProfile": [
"Invalid CallingProfileId!"
]
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-b0da85edb231924dee2cf223620f3e60-e788e6802f612a84-00"
}
■ | 400 Bad Request: 'No SBCs attached to Calling Profile'; see Map Calling Profiles to SBC Devices to verify which SBC devices are attached to Calling Profiles. |
{
"errors": {
"CallingProfile": [
"There are no SBCs assigned to this calling profile!"
]
},
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-ce7db116205054eee1c59c80ebe7f48d-d5a3edc4aadfc80d-00"
}